// app.js
App({
  globalData: {
    screenWidth: 375,
    screenHeight: 667,
    statusHeight: 20,
    contentHeight: 500
  },
  onLaunch() {
    // 1.获取设备的信息
    const res = wx.getWindowInfo()
    this.globalData.screenWidth = res.screenWidth
    this.globalData.screenHeight = res.screenHeight
    this.globalData.statusHeight = res.statusBarHeight
    this.globalData.contentHeight = res.screenHeight - res.statusBarHeight - 44
  }
})
